package com.coderbean.demo;


import java.io.Serializable;

/**
 * @author guoguoyong
 * 2021年11月19日
 * email: 769201593@qq.com
 */
public class Result<T> implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -541562789685810798L;
	
	private boolean success;
	
	private String message;
	
	private T data;
	
	private String code;
	

	public Result(boolean success, String message, String code) {
		super();
		this.success = success;
		this.message = message;
		this.code = code;
	}

	public Result(boolean success, String message, T data, String code) {
		super();
		this.success = success;
		this.message = message;
		this.data = data;
		this.code = code;
	}

	public Result() {
		this.success = true;
	}

	public Result(boolean success, T data) {
		super();
		this.success = success;
		this.data = data;
	}

	public Result(String message) {
		super();
		this.message = message;
		this.success = true;
	}

	public Result(T data) {
		super();
		this.data = data;
		this.success = true;
	}

	public Result(boolean success) {
		super();
		this.success = success;
	}

	public Result(String message, T data) {
		super();
		this.message = message;
		this.data = data;
		this.success = true;
	}

	public Result(boolean success, String message, T data) {
		super();
		this.success = success;
		this.message = message;
		this.data = data;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	

}
